home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / editor / dedupe12.zip / DEDUPE.DOC next >
Text File  |  1997-05-12  |  8KB  |  168 lines

  1.                      DeDupe (or Extract Unique Lines) V1.2
  2.  
  3.                               by John Augustine
  4.  
  5.            DD (DeDupe) was written in Assembly for MS Dos Systems.
  6.  
  7.   DD is Simple to use.  Requires Color Graphics (CGA) or better. Runs on 8086
  8. to Pentium PCs.  Does Not Need a Lot of Memory to Operate.
  9.  
  10.   IMPORTANT: If the size of the File is Very Large, I recommend a Fast
  11. Computer.
  12.  
  13.   DD will Remove ALL (Exact) Duplicate Lines located Anywhere in the File.  The
  14. File Must be an Ascii File with Lines that are No Longer than 255 Characters.
  15. Lines MUST End with a Carriage Return (CR) and Line Feed (LF) (Usually does).
  16. Also, DD has Extract Unique Lines Feature and a File/s Viewer (View One or Many
  17. Files in Text Mode in a Single Pass).
  18.  
  19.   The Difference between "DeDupe" and "Extract Unique":
  20.  
  21.   The "Original" Lines, located closer to the beginning of the File, will go
  22. into the Created "DeDupped" file (".DDD" Extension), while the Duplicate Lines,
  23. located "downstream", will be passed over (Ignored), or (Option) go into
  24. another File referred to as the "Dupes" File (".DUP" Extension). "Extract
  25. Unique" also Removes the "Original" Line/s when a Duplicate/s exists, and Only
  26. Unique Lines (Lines without a Duplicate) will enter the "Unique" File (".UUU"
  27. Extension).
  28.  
  29.   "Extract Unique" can be Very Useful.  Here is One of Many possible scenarios.
  30. You found out that someone was "Tampering" with a Report.  Lines were deleted
  31. from various parts of the File.  New Lines were added at Different parts of the
  32. File.  If that wasn't Bad Enough, some lines were modified.  The "Intruder"
  33. didn't know that you have a Backup of the File.  Now you want to know what
  34. Lines were added, deleted, or modified.  This is Very Difficult if the File has
  35. several thousand Lines.  A side by side comparison is Difficult if the Modified
  36. File had Lines Removed or Added, which shifts the rest of the Lines Up or Down
  37. at Various "Points" throughout the File.
  38.  
  39.   Simply Merge (Join) one File with the other using Dos's Copy Command:
  40.  
  41.   "Copy File1+File2 NewFile"  (without quotes)
  42.  
  43.   "File1" is the Original File, "File2" is the "Tampered" File, and "NewFile"
  44. is the Two Files Merged into One.  Note: The Original File could be "File2"
  45. instead of "File1" and vise versa.  The outcome will still be the Same.  Select
  46. "Extract Unique Lines" from the DD Menu to Create a File with Only Unique Lines
  47. (New Lines added in Tampered File, Deleted Lines will Only Exist in the
  48. Original File which will make them "Unique", and Modified Lines will be
  49. "Unique" which also makes the Original Lines in the Original File "Unique").
  50. In other words, all the Un-modified Lines that Exists in Both the Original File
  51. and the "Tampered" File will "Cancel" each other out leaving only the "Unique"
  52. Lines for the "Unique" File (Created).
  53.  
  54.    GETTING STARTED:
  55.  
  56.   Type (without quotes) "DEDUPE FileName.Ext" and press Enter, or
  57.  
  58.   Type "DEDUPE" and press Enter.  You can Enter the File Name Later.
  59.  
  60.   LARGE FILES (Several Thousand Lines) TAKE "TIME":
  61.  
  62.   See "TECH.DOC" for the Details on why it takes "Time" when "DeDupping" a
  63. Large File.  Note: The reason has to do with the number of Line Comparisons
  64. involved, which is an Astronomical Number for Large Files.  Note: Some "Un-
  65. Dupe" Utilities require a Sorted File.  Removing Duplicate Lines from a Sorted
  66. File (using another "Un-Dupe" Utility) is Very Simple and Very Fast.
  67.  
  68.   POSSIBLE PROBLEMS "DEDUPPING" A FILE:
  69.  
  70.   1.  CR/LF Only Lines used for Spacing:
  71.  
  72.   DD Defaults to Ignoring lines that Start with CR/LF (Only) which are used for
  73. Spacing between Paragraphs, etc.  You can Toggle this Off (Don't Ignore) and
  74. Remove those (Duplicate) CR/LF Lines (Except the First "Original" one).  Here
  75. is a Reason (Example) you may want those CR/LF Lines Removed.
  76.  
  77.   Input File (In Part) ("<CR>" represents Both CR and LF):
  78.  
  79. <CR>
  80.   I have a Message for you.  My Subject will be Little Bo Peep.
  81.   It says here, Little Bo Peep has lost her sheep.
  82. <CR>
  83.   I have a Message for you.  My Subject will be Little Bo Peep.
  84.   It says here, Little Bo Peep has lost her sheep.
  85. <CR>
  86.   Bla Bla Bla ....
  87.  
  88.   Created "DeDupped" File.DDD:
  89.  
  90. <CR>
  91.   I have a Message for you.  My Subject will be Little Bo Peep.
  92.   It says here, Little Bo Peep has lost her sheep.
  93. <CR>
  94. <CR>
  95.   Bla Bla Bla ....
  96.  
  97.   2.  Lines that are used as Markers or Separators (Example: "---------------")
  98. throughout the File (which are Duplicates).  Removing those Separators could
  99. make the Document more Difficult to "follow".  DD is Not designed to Ignore
  100. other Patterns (Only CR/LF).
  101.  
  102.    IMPORTANT NOTES:
  103.  
  104.   There is an Option (In DD's Sub-Menu) available for you to Create another
  105. File for All the Duplicate Lines (Good for Reference) during the "DeDupe"
  106. Process.  If there are No Duplicate Lines in the File, the ".DUP" File will
  107. have 0 Bytes.  The Same thing happens (0 Byte File) with "Extract Unique" for
  108. Two Merged Files which are Exactly the Same (No Unique Lines).  If Both Files
  109. had a EOF Marker Character, Dos will eliminate the EOF Marker of the First File
  110. during the "Merging" Process and the Merged Files will have an EOF Marker at
  111. the End of the Combined File.  This EOF Character will become the Only "Unique"
  112. Line in the Created "Unique" File, when Both Files are Exact Duplicates with
  113. an EOF Character at the End.
  114.  
  115.   TEST DD YOURSELF:
  116.  
  117.   Note:  I included "TEST1.TXT" and "TEST2.TXT" Files.  "TEST2.TXT" has several
  118. Duplicate lines throughout.  Use DD's File Viewer to Look at both Files using
  119. the "TEST*.TXT" for the File Name (Wildcard to see both Files in One Pass).
  120.  
  121.  1. Select "DeDupe" at the Main Menu and "DeDupe" (Remove Duplicate Lines)
  122. "TEST2.TXT" (Creates another File with .DDD (Default)).
  123.  
  124.  2. Now, back at the DD's Main Menu, select View File/s again.
  125.  
  126.  3. Enter (without quotes) "TEST2.DDD" for the File Name to see the File
  127. Created without any Duplicate Lines.  "TEST2.DDD" will be Exactly the same as
  128. "TEST1.TXT" (Reference File for Comparison).
  129.  
  130.   IMPORTANT NOTE:
  131.  
  132.   If you make your own "Test" file with Duplicates.  The Duplicate Lines MUST
  133. be Added "Downstream" from their Original location in the File.
  134.  
  135.   After you "DeDupe" your own Test File, and if the ".DDD" File is Not a
  136. Perfect Match to your Original Reference File, use DD's File Viewer and go to
  137. the End (Press End Key) and Check the EOF (End of File) Character.  You may
  138. have "Pasted" a Duplicate Line at the End, which Possibly (Depends on the
  139. Editor) Indents the EOF Character after the Last Line (Mine does).  That is the
  140. Reason the Two Files are not a Perfect Match.  View the End of your Reference
  141. File for comparison.
  142.  
  143.   DD LIMITATIONS:
  144.  
  145.   There is No Limit to the Size of the File that DD can Handle.  There is a
  146. Limit for the number of Lines in the File, and the number of Characters (255
  147. Maximum) in Each Line.  Don't "DeDupe" a File with more than 520,000 Lines.  It
  148. is Very Unlikely that you have a File this Big unless you own a Large Company.
  149. Note: If the Average Line Length is 60 Characters per Line, that would be
  150. almost 32 Megabytes!
  151.  
  152.   FINAL COMMENTS:
  153.  
  154.   Any Comments, Complaints, or Suggestions are ALWAYS Welcomed.  Any questions,
  155. please include a Self Addressed Stamped Envelope, or send me E-Mail.
  156.  
  157.   A Small Donation for All my Work will be GREATLY APPRECIATED and Motivate me
  158. into other Projects that may be Beneficial to you.  If you have a question,
  159. don't feel obligated to make a donation in order to get an Answer.
  160.  
  161.                    E-Mail:  john.augustine@gmiibbs.com
  162.  
  163.                             John Augustine N3AOF
  164.                             3129 Earl St.
  165.                             Laureldale, Pa 19605
  166.                             (610) 929-8850
  167.  
  168.